#define _CRT_SECURE_NO_WARNINGS 1
#include <iostream>
using namespace std;
class A
{
public:
	virtual ~A()
	{
		cout << "~A" << endl;
	}
	int _a;
};

class B : public A
{
public:
	~B()
	{
		cout << "~B" << endl;
	}
	int _b;
};
int main()
{
	A* ptr = new B;
	delete ptr;
	return 0;
}